home *** CD-ROM | disk | FTP | other *** search
-
-
-
- while(n) Tcl Built-In Commands
-
-
-
- _________________________________________________________________
-
- NAME
- while - Execute script repeatedly as long as a condition is
- met
-
- SYNOPSIS
- while _t_e_s_t _b_o_d_y
- _________________________________________________________________
-
-
- DESCRIPTION
- The _w_h_i_l_e command evaluates _t_e_s_t as an expression (in the
- same way that expr evaluates its argument). The value of
- the expression must a proper boolean value; if it is a true
- value then _b_o_d_y is executed by passing it to the Tcl inter-
- preter. Once _b_o_d_y has been executed then _t_e_s_t is evaluated
- again, and the process repeats until eventually _t_e_s_t evalu-
- ates to a false boolean value. Continue commands may be
- executed inside _b_o_d_y to terminate the current iteration of
- the loop, and break commands may be executed inside _b_o_d_y to
- cause immediate termination of the while command. The while
- command always returns an empty string.
-
-
- KEYWORDS
- boolean value, loop, test, while
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Tcl 1
-
-
-
-